-
-
Notifications
You must be signed in to change notification settings - Fork 364
refactor(Html2Image): update Html2Image extension package #5426
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-Authored-By: ElanCao <[email protected]>
Reviewer's Guide by SourceryThis PR updates the Html2Image extension package. The main changes include removing the default implementation of the No diagrams generated as the changes look simple and do not need a visual representation. File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @ArgoZhang - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider removing the try-catch blocks in the original DefaultHtml2ImageService as they are no longer needed.
- The added test case is good for verifying the behavior of the service when the Html2Image package is not added.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5426 +/- ##
===========================================
+ Coverage 99.87% 100.00% +0.12%
===========================================
Files 646 645 -1
Lines 29387 29351 -36
Branches 4135 4130 -5
===========================================
+ Hits 29349 29351 +2
+ Misses 38 0 -38 ☔ View full report in Codecov by Sentry. |
update Html2Image extension package
Summary of the changes (Less than 80 chars)
简单描述你更改了什么, 不超过80个字符;如果有关联 Issue 请在下方填写相关编号
Description
fixes #5425
Regression?
[If yes, specify the version the behavior has regressed from]
[是否影响老版本]
Risk
[Justify the selection above]
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Refactors the Html2Image service to improve error handling and provide guidance to users on how to install and register the required dependency. The service now throws an exception if the
BootstrapBlazor.Html2Imagepackage is not installed, and the API is updated to use an interface for the options.Bug Fixes:
Enhancements:
NotImplementedExceptionwith a message that instructs the user to install theBootstrapBlazor.Html2Imagepackage and register the service usingAddBootstrapBlazorHtml2ImageService.GetDataAsyncandGetStreamAsyncmethods inDefaultHtml2ImageServiceto accept an optionalIHtml2ImageOptionsparameter, providing more flexibility in configuring the image export.Tests:
NotImplementedExceptionwhen the required dependency is missing.